package com.car.dal.dao.goods;


import java.util.List;

import com.car.bean.GridObj;
import com.car.bean.OrderObj;
import com.car.bean.PageObj;
import com.car.dal.dao.ibatis.IbatisCommonDao;
import com.car.dal.object.GoodsNew;
import com.car.util.Page;

public class GoodsNewDaoImpl extends IbatisCommonDao<GoodsNew, Long> implements GoodsNewDao {

	@Override
	public GridObj GetList(GoodsNew goodsNew, PageObj pageObj) {
		OrderObj order = new OrderObj();
		order.setDir("desc");
		order.setSort("id");
		return super.findByPage(goodsNew, pageObj, order);
	}
	
	public  Integer getGoodsNewCount(GoodsNew goodsNew){
		return this.queryForInteger("getGoodsNewCount", goodsNew);
	}

	@Override
	public List<GoodsNew> getGoodsnew(GoodsNew goodsNew, Page page) {
		goodsNew.setFirstrownum(page.getFirstrownum());
		goodsNew.setPagesize(page.getPagesize());
		List<GoodsNew> list = this.queryForEntityList(GoodsNew.class, "getGoodsNew", goodsNew);
		return list;
	}

	@Override
	public List<GoodsNew> getGoodsNewList(GoodsNew goods) {
		List<GoodsNew> list = this.queryForEntityList(GoodsNew.class, "getGoodsNewList", goods);
		return list;
	}
	

}
